/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.beautycenter.Funcionalidades;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 *
 * @author JoãoVictor
 */
public class Relatorios {
    
    public static double retornarTotalPorcentagem(double valor, double porcentagem){
        BigDecimal b = new BigDecimal(valor).setScale(2, RoundingMode.HALF_EVEN);
        b = b.multiply(new BigDecimal(porcentagem)).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN);
        
        return b.doubleValue();
    }
}
